<?php
session_start();
if (isset($_POST['openid']) && !empty($_POST['openid'])){
    include '../c/config.php';
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {}
    $openid=addslashes(trim($_POST['openid']));
    $query=$mysqli->query("SELECT id FROM qdui where openid='".$openid."' limit 0,1 ");
    $step=1;
    if($query->num_rows>0){
        $step=2;
    }
    $mysqli->close();
    echo json_encode(array('s'=>$step));
}

